package com.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.pojo.Department;
import com.pojo.Employee;
import com.service.EmployeeService;
import com.service.RoleService;
import com.sun.javafx.collections.MappingChange;
import com.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Controller
@Transactional
@RequestMapping("/param")
public class ParameterController {
    @Autowired
    public EmployeeService employeeService;
    @RequestMapping("/empedit")
    @ResponseBody
    public String empedit(Integer empno) throws Exception{

       return JSON.toJSONString(employeeService.employeeFindByEmpno(empno), SerializerFeature.DisableCircularReferenceDetect);
    }
}
